import { ComputedRef, Ref } from "vue";
import { baseSaleAttribute, saleAttributeInfo, spu, spuImage, spuInfo } from "@/api/product/spuApi/interface.ts";
import { pageParamsInterface } from "@/views/product/trademark/interface/interface.ts";
import { trademark } from "@/api/product/trademarkApi/interface.ts";

export interface spuStore {
  spuListInfo: Ref<spuInfo | undefined>;
  total: ComputedRef<number | undefined>;
  spuList: ComputedRef<spu[] | undefined>;
  screen: Ref<number>;
  edit: Ref<boolean>;
  trademarkList: Ref<trademark[]>;
  spuImageList: Ref<spuImage[]>;
  spuSaleAttributeList: Ref<saleAttributeInfo[]>;
  baseSaleAttributeList: Ref<baseSaleAttribute[]>;
  currentSpu: Ref<spu | null>;
  selectSaleAttribute: ComputedRef<baseSaleAttribute[]>;
  saleAttrIdAndName: Ref<string>;
  changeScreen: (flag: number) => void;
  changeEdit: (flag: boolean) => void;
  fetchSpuList: (pageParams: pageParamsInterface, category3Id: number | string) => Promise<void>;
  deleteSpu: (spuId: number) => Promise<string>;
  fetchTrademarkList: () => Promise<void>;
  fetchSpuImageList: (spuId: number) => Promise<void>;
  fetchSpuSaleAttributeList: (spuId: number) => Promise<void>;
  fetchBaseSaleAttributeList: () => Promise<void>;
  findSpu: (currentSpu: spu) => void;

}
